Let $A$ be a point on the circle $x^2 + y^2 - 12x + 31 = 0,$ and let $B$ be a point on the parabola $y^2 = 4x.$  Find the smallest possible distance $AB.$
Explanation: Completing the square on $x^2 + y^2 - 12x + 31 = 0,$ we get
\[(x - 6)^2 + y^2 = 5.\]Thus, the center of the circle is $(6,0),$ and its radius is $\sqrt{5}.$

Note that the parabola $y^2 = 4x$ opens to the right.  Let $2t$ be the $y$-coordinate of $B.$  Then
\[x = \frac{y^2}{4} = \frac{(2t)^2}{4} = t^2,\]so $B = (t^2,2t).$

Let $C = (6,0),$ the center of the circle.

[asy]
unitsize(0.6 cm);

real upperparab (real x) {
  return (sqrt(4*x));
}

real lowerparab (real x) {
  return (-sqrt(4*x));
}

pair A, B, C;

C = (6,0);
A = C + sqrt(5)*dir(140);
B = (5,upperparab(5));

draw(Circle(C,sqrt(5)));
draw(graph(upperparab,0,8));
draw(graph(lowerparab,0,8));
draw(A--B--C--cycle);

dot("$A$", A, NW);
dot("$B$", B, N);
dot("$C$", C, S);
[/asy]

By the Triangle Inequality, $AB + AC \ge BC,$ so
\[AB \ge BC - AC.\]Since $A$ is a point on the circle, $AC = \sqrt{5},$ so
\[AB \ge BC - \sqrt{5}.\]So, we try to minimize $BC.$

We have that
\begin{align*}
BC^2 &= (t^2 - 6)^2 + (2t)^2 \\
&= t^4 - 12t^2 + 36 + 4t^2 \\
&= t^4 - 8t^2 + 36 \\
&= (t^2 - 4)^2 + 20 \\
&\ge 20,
\end{align*}so $BC \ge \sqrt{20} = 2 \sqrt{5}.$  Then $AB \ge 2 \sqrt{5} - \sqrt{5} = \sqrt{5}.$

Equality occurs when $A = (5,2)$ and $B = (4,4),$ so the smallest possible distance $AB$ is $\boxed{\sqrt{5}}.$